package cn.funcat.map.tile
{
	import cn.funcat.util.FunCatConsts;
	import cn.funcat.map.layer.bound.Eds3DBound;
	
	
	/****
	 * 如果需要改变城市, 修改这两个类就可以了.
	 * 首先要找到url pattern.
	 * 在这个里面拼装
	 * 
	 */ 
	public class Eds3DTileContext extends TileContextBase
	{		
		public function Eds3DTileContext()
		{
			super();	
			this._bound = new Eds3DBound();
		}
		
		override public function getTileURL(x:Number, y:Number, z:Number):String{
			
			//没有去测试其他城市的图片范围.
			if(!inBound(x, y, z)){
				//return FunCatConsts.BASE_URL + FunCatConsts.BLANK_TILE;
				//这个是合肥的, 目前还不打算做到, 从FCMap里面直接改变城市
				return "http://2dpic.edushi.com/hefei/0/132,55.jpg";//Blank pic
			}
			
			
		/* 	return FunCatConsts.BASE_URL + FunCatConsts.THREE_D_ADDR + z.toString() + "/" + x.toString() + "," +
				y.toString() + ".png";  */
				
		 	return "http://pic.edushi.com//hefei//mappic/png"+ z.toString() +"/" + x.toString()
				+ "," + y.toString() + ".png?t=3";
			//上海: http://p2322.spic2.edushi.com/cn/shanghai/zh-chs/mappic/png3/23,22.png
			//var url:String = "http://p2322.spic2.edushi.com/cn/shanghai/zh-chs/mappic/png"+ (z-1).toString() +"/" + x.toString() + "," + y.toString() + ".png";
			//trace(url);
			//return url;
		}
		

		
	}
}